package org.example.product.service.impl;

import org.example.product.dao.CategoryDao;
import org.example.product.service.CategoryService;
import org.example.product.service.HomeService;
import org.example.product.vo.CategoryVo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @author 小杰_cc
 * @version 1.0
 */
@Service("homeService")
public class HomeServiceImpl implements HomeService {

    @Autowired
    private CategoryDao categoryDao;

    @Autowired
    private CategoryService categoryService;

    // 首页一级分类
    @Override
    public List<CategoryVo> queryCategoryTree() {
        List<CategoryVo> categoryVos = categoryService.tree();
        return categoryVos;
    }
}
